package com.czmh.etc.onlinepubsys.services.mingchuang.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.czmh.etc.onlinepubsys.entity.mingchuang.ApplyInfo;
import com.czmh.etc.onlinepubsys.entity.mingchuang.EtcOrder;
import com.czmh.etc.onlinepubsys.maper.mingchuang.ApplyInfoMapper;
import com.czmh.etc.onlinepubsys.services.mingchuang.IEtcApplyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(rollbackFor = Exception.class)
public class EtcApplyServiceImpl implements IEtcApplyService {
    @Autowired
    private ApplyInfoMapper applyInfoMapper;

    @Override
    public void save(ApplyInfo entity) {
        applyInfoMapper.insert(entity);
    }

    @Override
    public ApplyInfo get(String id) {
        return applyInfoMapper.selectById(id);
    }

    @Override
    public void update(ApplyInfo applyInfo) {
        applyInfoMapper.updateById(applyInfo);
    }

    @Override
    public ApplyInfo queryObject(QueryWrapper<ApplyInfo> queryWrapper){
        return applyInfoMapper.selectOne(queryWrapper);
    }

    @Override
    public List<ApplyInfo> queryList(QueryWrapper<ApplyInfo> queryWrapper){
        return applyInfoMapper.selectList(queryWrapper);
    }
}
